﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bluyel.Core
{
    /// <summary>
    /// Prefixes of the Length quantity.
    /// (multiplie or sub-multiple of the qty).
    /// 
    /// http://en.wikipedia.org/wiki/Metre
    /// 
    /// Its a base quantity.
    /// </summary>
    public enum TypePhyLengthPrefix
    {
        //----SI

        // 10−24 m 	ym 	yoctometre
        Yoctometre,

        // 10−21 m 	zm 	zeptometre
        Zeptometre,

        // 10−18 m 	am 	attometre
        Attometre,

        // 10−15 m 	fm  femtometre
        Femtometre,

        // 10−12 m  pm  picometre
        Picometre,

        // 10−9 m 	nm 	nanometre
        Nanometre,

        // 10−6 m 	µm 	micrometre
        Micrometre,

        // 10−3 m 	mm 	millimetre
        Millimetre,

        // 10−2 m 	cm 	centimetre
        Centimetre,

        // 10−1 m 	dm 	decimetre
        Decimetre,

        // the default prefix/multiple.
        Metre,

        // 10_1 m dam decametre
        Decametre,

        // 10_2 m hm hectometre
        Hectometre,

        // 10_3 m km kilometre
        Kilometre,

        // 10_6 m Mm megametre
        Megametre,

        // 10_9 m Gm gigametre
        Gigametre,

        // 10_12 m Tm terametre
        Terametre,

        // 10_15 m Pm petametre
        Petametre,

        // 10_18 m Em exametre
        Exametre,

        // 10_21 m Zm zettametre
        Zettametre,

        // 10_24 m Ym yottametre
        Yottametre,

        //----None SI

        // 10-10 m 1 ångström
        Angstrom,

        // 1 yard= 0.9144 metre
        Yard,

        //1 inch= 0.0254 metres
        Inch,
    }

    //public enum TypePhyLengthPrefixSymbol
    //{
    //    // 10−24 m 	ym 	yoctometre
    //    ym,

    //    // 10−21 m 	zm 	zeptometre
    //    zm,

    //    // 10−18 m 	am 	attometre
    //    am,

    //    // 10−15 m 	fm  femtometre
    //    fm,

    //    // 10−12 m  pm  picometre
    //    pm,


    //    cm,
    //    dm,
    //    m,
    //    dam,
    //    km
    //}

    /// <summary>
    /// Represents the physical quantity Length.
    /// 
    /// Its a base Quantity.
    /// </summary>
    public class TypePhyLength : TypePhyBase
    {
        /// <summary>
        /// The default prefix used for this qty length type.
        /// 
        /// exp: Metre, km, cm, mm,...
        /// </summary>
        TypePhyLengthPrefix _defaultPrefix;

        //=====================================================================
        #region Constructors.

        //---------------------------------------------------------------------
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="prefix"></param>
        public TypePhyLength(UniqueId id, string name):base(id,name)
        {
            // set the default prefix (multiple 10E1)
            _defaultPrefix = TypePhyLengthPrefix.Metre;
        }

        //---------------------------------------------------------------------
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="defaultPrefix"></param>
        public TypePhyLength(UniqueId id, string name, TypePhyLengthPrefix defaultPrefix)
            :base(id, name)
        {
            _defaultPrefix= defaultPrefix;
        }

        #endregion

        //=====================================================================
        #region Properties.

        //---------------------------------------------------------------------
        public TypePhyLengthPrefix DefaultPrefix
        {
            get { return _defaultPrefix; }
        }

        #endregion

        //=====================================================================
        #region Public methods.

        //---------------------------------------------------------------------
        public override string ToString()
        {
            return "PhyLength";
        }


        #endregion
    }
}
